function x = writeNumberErrors(Persons,sFolderStart)
%WRITENUMBERERRORS vypocte pravdepodobnosti a kolikrat se sit zmylila
%                  ve vektoru Persons je, pro jake pocty osob se ma chyba
%                  pocitat
if nargin < 2
    sFolderStart = './inputs/';
    if nargin < 1
        Persons = 2:40;
    end
end
x = zeros(1,length(Persons));
j = 1;
for nPersons=Persons
    load([sFolderStart int2str(nPersons) '/errors' int2str(nPersons) '.mat'],'errorsIn');
    e = 0;
    nInputs = size(errorsIn,2);
    for i=1:nInputs
        e = e + size(errorsIn{i},2);
    end
    k = e *( 100 / (nPersons * 5 * nInputs));
    x(j) = 100 - k;
    j = j+1;
end
